package com.messaging;

/**
 * @author sad
 */
public class WaitAckMessage {

    private final int ackIndex;
    private long lastRetryTime;
    private int retryCount;
    private final Message packet;

    public WaitAckMessage(int ackIndex, Message packet) {
        this.ackIndex = ackIndex;
        this.packet = packet;
        lastRetryTime = System.currentTimeMillis();
        retryCount = 0;
    }

    public int getAckIndex() {
        return ackIndex;
    }

    public Message getPacket() {
        return packet;
    }

    public long getLastRetryTime() {
        return lastRetryTime;
    }

    public void setLastRetryTime(long lastRetryTime) {
        this.lastRetryTime = lastRetryTime;
    }

    public int getRetryCount() {
        return retryCount;
    }

    public void setRetryCount(int retryCount) {
        this.retryCount = retryCount;
    }

}
